﻿using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using O1;
using O1.Data;
using O1.Data.Traversal;

namespace Tests.O1.Data.Traversal
{
    [TestClass]
    public class FilterTests
    {
        [TestMethod, TestCategory("Unit Test")]
        public void FilterPropertyInterestIsAllByDefault()
        {
            new Filter().PropertyInterest.Should().Be(PropertyInterests.All);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterClearEdgeStateIsInterestedByDefault()
        {
            var target = new Filter();
            target.EndEdge(ObservationInterests.Interested).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterClearVertexStateIsInterestedByDefault()
        {
            var target = new Filter();
            target.EndVertex(ObservationInterests.Interested).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateDatePropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new DateProperty()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateDateTimePropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new DateTimeProperty()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateDecimalPropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new DecimalProperty()).Should().Be(ObservationInterests.Interested);
        }
        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateHashPropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new HashProperty()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateInt16PropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new Int16Property()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateInt32PropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new Int32Property()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateInt64PropertyIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new Int64Property()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterEvaluateIsInterestedByDefault()
        {
            var target = new Filter();
            target.Evaluate(new StringProperty()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterSetContextCellAddressIsInterestedByDefault()
        {
            var target = new Filter();
            target.StartVertex(new CellAddress()).Should().Be(ObservationInterests.Interested);
        }

        [TestMethod, TestCategory("Unit Test")]
        public void FilterSetContextEdgeIsInterestedByDefault()
        {
            var target = new Filter();
            target.StartEdge(new Edge(), EdgeDirections.Inbound).Should().Be(ObservationInterests.Interested);
        }
    }
}
